package demo1;

public class test1 {

    public static void main(String[] args) {
        L1 l1 = ()->{
            System.out.println("i aml1");
        };
        l1.test();

        OneParam i2 = (str -> str+" end");
        System.out.println(i2.test("你好"));
    }
}


//没有参数和返回值的函数式接口
@FunctionalInterface
interface L1{
    void test();

}

//有一个参数可返回值的函数式接口
@FunctionalInterface
interface OneParam{
    String test(String str);
}
